package com.xxxx.server.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xxxx.server.pojo.Employee;
import com.xxxx.server.pojo.EmployeeDataBase;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zhoubin
 * @since 2020-10-15
 */
public interface EmployeeMapper  extends BaseMapper<Employee> {




    //分页展示数据
    List<Employee> getEmployeeByPage(@Param("currentPage") Integer currentPage, @Param("size") Integer size, @Param("emp") Employee employee, @Param("beginDateScope") Date[] beginDateScope);

    //时间差
    Long getTotal(@Param("emp") Employee employee, @Param("beginDateScope") Date[] beginDateScope);


    //更新员工信息
    Integer updateEmployeeById(Employee employee);

    //获取id  +1 赋值给新进员工
    Integer maxWorkID();


    //添加员工信息
    Integer EmployeeInsert(EmployeeDataBase employeeDataBase);

    //导出所有数据
    List<EmployeeDataBase> QueryAllEmployee();

    //导入Excel数据
    Integer employeeCount();

    /**
     * 处理关联员工
     * @param id
     */
    void updateEmployeeSalaryId(Integer id);

    /**
     * 处理多名关联员工
     * @param ids
     */
    void updateEmploySalaryIds(String[] ids);


}
